#include<bits/stdc++.h>
using namespace std;
int n,ans;
int f[100005];
bool b[100005];
vector<int> v;
int main(){
    ios::sync_with_stdio(false);
    cin.tie(0);cout.tie(0);
    freopen("duel.in","r",stdin);
    freopen("duel.out","w",stdout);
    cin>>n;
    for (int i=1;i<=n;i++) {
        int m;cin>>m;
        f[m]++;
        if (b[m]==0) {v.push_back(m);b[m]=1;}
    }
    sort(v.begin(),v.end());
    for (int i=1;i<v.size();i++){
        int m=f[v[i]];
        for (int j=i-1;j>=0;j--){
            if (f[v[j]]<m) {ans+=f[v[j]];m-=f[v[j]];}
            else if(f[v[j]]>=m) {ans+=m;f[v[j]]-=m;break;}
        }
    }
    cout<<n-ans;
    return 0;
}
